<template>
  <div>
    <div id="app">
      <Leftmenu v-if="loding" />
      <div style="" class="main1">
        <Operate v-if="loding " />
        <Crumbs v-if="loding && $route.path!=='/home'" />
        <router-view />
      </div>
    </div>
  </div>
</template>
<script>
import Bus from '@/components/eventBus'
import Leftmenu from '@/components/Leftmenu.vue'
import Operate from '@/components/Operate.vue'
import Crumbs from '@/components/crumbs.vue'
export default {
  data() {
    return {
      loding: false
    }
  },
  created() {
    let token = localStorage.getItem('shuchotaitoken')
    if (token) {
      this.loding = true
    } else {
      this.loding = false
    }
    Bus.$on('login', e => {
      this.loding = e
    })
    Bus.$on('login1', e => {
      this.loding = e
    })
  },
  components: {
    Leftmenu,
    Operate,
    Crumbs
  }
}
</script>
<style lang="less">
#app {
  display: flex;
  height: 100%;
  width: 100%;
  background-color: rgb(233, 238, 238);
  .main1 {
    flex: 1;
    width: 100%;
    // height: 100%;
    // background-color: rgb(32, 143, 240);
    height: 100vh;
    overflow: auto;
  }
}
body {
  margin: 0;
  padding: 0;
  font-size: 10px;
  height: 100%;
  width: 100%;
}
html {
  height: 100%;
  width: 100%;
  font-size: calc(100vw / 3.75);
  overflow-x: hidden;
  // font-size: calc(100vh / 3.75);
}
</style>
